
clear; clc; close all
%Parameters

a = 0.2; % proportion of male pop using the anti-aphrodisiac
mp =0.5; % male proportion of butterfly
d = 0.5; % death rate
c = 20;  % clutch size (number of eggs per butterfly)

Po = 10; % initial population

% ode solver ode45

[t, P]=ode45(@(t,P) Popode(t,P,mp,a,d,c ),...
    [0 10], Po);

figure(1)
plot(t, P,'LineWidth',2)
set(gca,'FontSize',16)
xlabel('time')
%ylabel('Population')
title('Population V1')

%%$ Second model adding carrying capacity and population of wasp changes
%%% with time.

b =0.01; % related to carrying capacity
B = 1; % related to wasp population W = B P
[t, P2]=ode45(@(t,P) Popode2(t,P,mp,a,d,c,b,B ),...
    [0 10], Po);

figure(2)
plot(t, P2,'LineWidth',2)
set(gca,'FontSize',16)
xlabel('time')
%ylabel('Population')
title('Population V2')

